﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OrderMovementDetail.aspx.cs" Inherits="WMS6.Web.Inventory.OrderMovementDetail" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>ASNDetail</title>
    <link href="../style/zh/1/css.css" type="text/css" rel="Stylesheet" id="mycss" />
    <link href="../Css/style.css" type="text/css" rel="stylesheet" />
    <script src="../Js/jquery.js" type="text/javascript"></script>
    <script src="../Js/jquery.simplemodal.js" type="text/javascript"></script> 
    <script src="../Js/util.js" type="text/javascript"></script>
    <script src="../Js/calendar.js" type="text/javascript" charset="gb2312"></script>
    <script src="../Js/InitPage.js" type="text/javascript"></script>
    <script src="../Js/Verification.js" type="text/javascript"></script>
    
    <script type="text/javascript">
        //初始化页面
        window.onload = function(){
            initDetailPage();
        }
        
        //弹出窗口选择Loc
        function selectToLoc() {
            var rtnValue = popModalWindow('../Configuration/LocationQuery.aspx?action=txtToLoc&ownerID=' + escape(document.getElementById("txtOwnerID").value), 'dialogWidth=800px;dialogHeight=500px;center=yes;resizable=yes;status=no;');
            if(rtnValue != null && rtnValue.toString() != "")
            {
                document.getElementById("txtToLoc").focus();
                document.getElementById("txtToLoc").value = rtnValue;
            }
        }


        function selectLocLopLpn() {
            var rtnValue = popModalWindow('../Inventory/InvLotLocLpnQuery.aspx?action=txtSkuID&OwnerID=' + escape(document.getElementById("txtOwnerID").value), 'dialogWidth=1000px;dialogHeight=500px;center=yes;resizable=yes;status=no;');
            if (rtnValue != null && rtnValue.toString() != "")
             {
                document.getElementById("lblMsg").style.display = "none";
                document.getElementById("lblMsg").innerText = "";

                var txtValue = rtnValue.split(',');

                if (parseInt(txtValue[5]) == 0) {
                    document.getElementById("lblMsg").style.display = "block";
                    document.getElementById("lblMsg").innerText = "该记录可用数量为0,不能进行转移操作!";
                    return;
                }
                else {
                    document.getElementById("hdnLot").value = txtValue[0];       //lot
                    document.getElementById("hdnFromLoc").value = txtValue[1];       //loc
                    document.getElementById("hdnFromLpn").value = txtValue[2];       //lpn
                    document.getElementById("hdnSkuID").value = txtValue[3];     //skuid
                    document.getElementById("txtSkuID").value = txtValue[3];     //skuid
                    __doPostBack("txtSkuID_OnTextChanged", "");
                }
            }
        }
        function selectToLpn() {
            var rtnValue = popModalWindow('../Inventory/LpnQuery.aspx?action=txtLot', 'dialogWidth=800px;dialogHeight=500px;center=yes;resizable=yes;status=no;');
            if (rtnValue != null && rtnValue.toString() != "") {
                document.getElementById("txtToLpnID").focus();
                document.getElementById("txtToLpnID").value = rtnValue;
                //__doPostBack("txtCarrierID_TextChanged","");
            }
        }
        function VerificationQty() {
            if(document.getElementById('txtQty').value.length>0 && document.getElementById('txtQty').value >0 )
            {
                //if (document.getElementById('txtQty').value > document.getElementById('txtAvailableQty').value)
                if (parseFloat(document.getElementById('txtQty').value) > parseFloat(document.getElementById('txtAvailableQty').value))
                {
                    document.getElementById('lblMsg').innerHTML = "移动数量不能大于可用数量！";
                    document.getElementById('txtQty').value = "";
                }
                else
                {
                    document.getElementById('lblMsg').innerHTML = "";
                }
            }
        }
        
    </script>
</head>
<body >
    <form id="F5223" runat="server" defaultbutton="">
    
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        
        <div id="div_top">
            <table>
                <tr>
                    <td valign="bottom"><asp:Label ID="lblOrderMovementDetail" runat="server" 
                            CssClass="label_header" Text="按单移动明细" ></asp:Label></td>
                    <td><asp:Button ID="btnCancel" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnCancel%>" 
                            AccessKey="c" onclick="btnCancel_Click"  Enabled="false"
                             /></td>
                    <td><asp:Button ID="btnSave" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnSave%>" 
                            AccessKey="s" onclick="btnSave_Click" Enabled="false" /></td>
                              <td><asp:Button ID="btnSaveContinue" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnSaveContinue%>"                            
                                      onclick="btnSaveContinue_Click" Enabled="false"  /></td>
                </tr>
            </table>
        </div>
          <asp:UpdatePanel ID="up1" runat="server">
            <ContentTemplate>
        <div>
            <asp:Label ID="lblMsg" runat="server" CssClass="label_message" 
                meta:resourcekey="lblMsg"></asp:Label>
        </div>        
        
        <div id="div_menu">
        <div style="float: left; width: 8px;">
                <div class="tabL" id="divL1"></div>
            </div>
            <div style="float:left;" class="tabLabelCont tabCur" onclick="setTab('one',1,2)" id="divM1">
                <asp:Label ID="one1" CssClass="hover" runat="server" 
                    meta:resourcekey="one1">基本信息</asp:Label></div>
            <div style="float: left; margin-right: 2px;">
                <div class="tabR" id="divR1"></div>
            </div>
        </div>
        
        <div id="div_content">
             <div id="con_one_1" style="display: block;">
                 <table width="720" style="display: block; margin-left: 10px; margin-top: 10px;">
                    <tr>
                        <td width="180px">
                            <asp:Label ID="lblLineID" runat="server" CssClass="label" Text="行号" 
                               ></asp:Label>
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblFromLoc" runat="server" CssClass="label" Text="货位" 
                             ></asp:Label><font color="red">*</font>
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblFromLpnID" runat="server" CssClass="label" Text="LPN" 
                             ></asp:Label>
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblToLoc" runat="server" CssClass="label" Text="至货位" 
                              ></asp:Label><font color="red">*</font>
                        </td>
                    </tr>
                    <tr>
                        <td width="180px">
                            <asp:TextBox ID="txtLineID" runat="server" CssClass="textbox" Enabled="False" ></asp:TextBox>
                        </td>
                        <td width="180px">
                         <asp:TextBox ID="txtFromLoc" runat="server" CssClass="textbox" ></asp:TextBox><img src="../Images/icon_find.gif" id="img2" runat="server" alt="select one item" class="img" onclick="selectLocLopLpn()" />
                        </td>
                        <td width="180px">
                            <asp:TextBox ID="txtFromLpnID" runat="server" CssClass="textbox"  Enabled="false" ></asp:TextBox>
                        </td>
                        <td width="180px">
                            <asp:TextBox ID="txtToLoc" runat="server" CssClass="textbox"  onkeyUp="SearchDataAjax(this,'LOC','txtToLoc');return false;" onblur="LoseFocus();return false" ></asp:TextBox><img src="../Images/icon_find.gif" id="img1" runat="server" alt="select one item" class="img" onclick="selectToLoc();"/>
                        </td>
                    </tr>
                    <tr>
                        <td width="180px">
                            <asp:Label ID="lblOwnerID" runat="server" CssClass="label" Text="货主代码" 
                               ></asp:Label>
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblSkuID" runat="server" CssClass="label" Text="货品代码" 
                              ></asp:Label><font color="red">*</font>
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblSkuDescr" runat="server" CssClass="label" Text="货品描述" 
                              ></asp:Label>
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblToLpnID" runat="server" CssClass="label" Text="至LPN" 
                              ></asp:Label></td>
                    </tr>
                    <tr>
                        <td width="180px">
                            <asp:TextBox ID="txtOwnerID" runat="server" CssClass="textbox" Enabled="false"
                               ></asp:TextBox> 
                        </td>
                        <td width="180px">
                            <asp:TextBox ID="txtSkuID" runat="server" CssClass="textbox"  OnTextChanged="txtSkuID_OnTextChanged" AutoPostBack="true"
                                ></asp:TextBox><img src="../Images/icon_find.gif" id="img3" runat="server" alt="select one item" class="img"  onclick="selectLocLopLpn()" />
                        </td>
                        <td width="180px">
                            <asp:TextBox ID="txtSkuDescr" runat="server" CssClass="textbox" Enabled="false"
                                ></asp:TextBox>
                        </td>
                        <td width="180px">
                            <asp:TextBox ID="txtToLpnID" runat="server" CssClass="textbox"
                              ></asp:TextBox><img src="../Images/icon_find.gif" id="imgOwnerID" runat="server" alt="select one item" class="img" onclick="selectToLpn();"/></td>
                    </tr>
                    <tr>
                        <td width="180px">
                            <asp:Label ID="lblLot" runat="server" CssClass="label" Text="批号" 
                               ></asp:Label>
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblFromQty" runat="server" CssClass="label" Text="数量" 
                               ></asp:Label>
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblAvailableQty" runat="server" CssClass="label" Text="可用数量" 
                                ></asp:Label>
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblQty" runat="server" CssClass="label" Text="移动数量" 
                                ></asp:Label><font color="red">*</font>
                        </td>
                    </tr>
                    <tr>
                        <td width="180px">
                            <asp:TextBox ID="txtLot" runat="server" CssClass="textbox"  Enabled="false"></asp:TextBox> 
                        </td>
                        <td width="180px">
                            <asp:TextBox ID="txtFromQty" runat="server" CssClass="textbox"  Enabled="false"
                                ></asp:TextBox> 
                        </td>
                        <td width="180px">
                            <asp:TextBox ID="txtAvailableQty" runat="server" CssClass="textbox"  Enabled="false"
                                ></asp:TextBox> 
                        </td>
                        <td width="180px">
                            <asp:TextBox ID="txtQty" runat="server" CssClass="textbox"  onblur="VerificationQty();"
                               ></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td width="180px">
                            <asp:Label ID="lblUomID" runat="server" CssClass="label" Text="单位" 
                              ></asp:Label>
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblPackID" runat="server" CssClass="label" Text="包装" 
                               ></asp:Label>
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblStatus" runat="server" CssClass="label" Text="状态" 
                                ></asp:Label>
                        </td>
                        <td width="180px">
                          
                        </td>
                    </tr>
                    <tr>
                        <td width="180px">
                            <asp:TextBox ID="txtUomID" runat="server" CssClass="textbox" Enabled="false"
                              ></asp:TextBox>
                        
                        </td>
                        <td width="180px">
                            <asp:TextBox ID="txtPackID" runat="server" CssClass="textbox" Enabled="false"
                             ></asp:TextBox>
                        </td>
                        <td width="180px">
                            <asp:DropDownList ID="ddlStatus" runat="server" CssClass="mediumselectbox" Enabled="False"  >
                                    </asp:DropDownList>
                        </td>
                        <td width="180px">
                          
                        </td>
                    </tr>
                    <tr>
                        <td width="180px">
                            <asp:Label ID="lblRemark" runat="server" CssClass="label" Text="备注" 
                               ></asp:Label>
                        </td>
                        <td width="180px">
                           
                        </td>
                        <td width="180px">
                          
                        </td>
                        <td width="180px">
                            &nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td  width="360px" colspan="2" rowspan="3">
                        <asp:TextBox ID="txtRemark" runat="server" CssClass="largetextarea" TextMode="MultiLine"
                                        meta:resourcekey="txtRemark"></asp:TextBox>
                        </td>
                        <td width="180px">
                           
                        </td>
                       
                    </tr>
                  <tr >                       
                        <td></td>
                        <td></td>
                    </tr>
                    
                    <tr >                       
                        <td></td>
                        <td></td>
                    </tr>
                        <tr style="height:20px;">
                        <td></td>
                        <td></td>      
                            <td></td>
                        <td></td>                          
                    </tr>
                   <tr>
                        <td width="180px">
                            <asp:Label ID="lblExternalLot" runat="server" CssClass="label" Text="外部批号" 
                              ></asp:Label>
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblLotAttr01" runat="server" CssClass="label" Text="批次属性01" 
                               ></asp:Label>
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblLotAttr06" runat="server" CssClass="label" Text="批次属性06" 
                                ></asp:Label>
                        </td>
                        <td width="180px">
                          
                        </td>
                    </tr>
                    <tr>
                        <td width="180px">
                            <asp:TextBox ID="txtExternalLot" runat="server" CssClass="textbox" Enabled="false"
                              ></asp:TextBox>
                        
                        </td>
                        <td width="180px">
                            <asp:TextBox ID="txtLotAttr01" runat="server" CssClass="textbox" Enabled="false"
                             ></asp:TextBox>
                        </td>
                        <td width="180px">
                            <asp:TextBox ID="txtLotAttr06" runat="server" CssClass="textbox" Enabled="false"
                             ></asp:TextBox>
                        </td>
                        <td width="180px">
                          
                        </td>
                    </tr>
                       <tr>
                        <td width="180px">
                            <asp:Label ID="lblVendorID" runat="server" CssClass="label" Text="供应商代码" 
                              ></asp:Label>
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblLotAttr02" runat="server" CssClass="label" Text="批次属性02" 
                               ></asp:Label>
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblLotAttr07" runat="server" CssClass="label" Text="批次属性07" 
                                ></asp:Label>
                        </td>
                        <td width="180px">
                          
                        </td>
                    </tr>
                    <tr>
                        <td width="180px">
                            <asp:TextBox ID="txtVendorID" runat="server" CssClass="textbox" Enabled="false"
                              ></asp:TextBox>
                        
                        </td>
                        <td width="180px">
                            <asp:TextBox ID="txtLotAttr02" runat="server" CssClass="textbox" Enabled="false"
                             ></asp:TextBox>
                        </td>
                        <td width="180px">
                            <asp:TextBox ID="txtLotAttr07" runat="server" CssClass="textbox" Enabled="false"
                             ></asp:TextBox>
                        </td>
                        <td width="180px">
                          
                        </td>
                    </tr>
                       <tr>
                        <td width="180px">
                            <asp:Label ID="lblProduceDate" runat="server" CssClass="label" Text="生产日期" 
                              ></asp:Label>
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblLotAttr03" runat="server" CssClass="label" Text="批次属性03" 
                               ></asp:Label>
                        </td>
                        <td width="180px">
                            <asp:Label ID="LotAttr08" runat="server" CssClass="label" Text="批次属性08" 
                                ></asp:Label>
                        </td>
                        <td width="180px">
                          
                        </td>
                    </tr>
                    <tr>
                        <td width="180px">
                            <asp:TextBox ID="txtProduceDate" runat="server" CssClass="textbox" Enabled="false"
                              ></asp:TextBox>
                        
                        </td>
                        <td width="180px">
                            <asp:TextBox ID="txtLotAttr03" runat="server" CssClass="textbox" Enabled="false"
                             ></asp:TextBox>
                        </td>
                        <td width="180px">
                            <asp:TextBox ID="txtLotAttr08" runat="server" CssClass="textbox" Enabled="false"
                             ></asp:TextBox>
                        </td>
                        <td width="180px">
                          
                        </td>
                    </tr>
                       <tr>
                        <td width="180px">
                            <asp:Label ID="lblExpiryDate" runat="server" CssClass="label" Text="失效日期" 
                              ></asp:Label>
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblLotAttr04" runat="server" CssClass="label" Text="批次属性04" 
                               ></asp:Label>
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblLotAttr09" runat="server" CssClass="label" Text="批次属性09" 
                                ></asp:Label>
                        </td>
                        <td width="180px">
                          
                        </td>
                    </tr>
                    <tr>
                        <td width="180px">
                            <asp:TextBox ID="txtExpiryDate" runat="server" CssClass="textbox" Enabled="false"
                              ></asp:TextBox>
                        
                        </td>
                        <td width="180px">
                            <asp:TextBox ID="txtLotAttr04" runat="server" CssClass="textbox" Enabled="false"
                             ></asp:TextBox>
                        </td>
                        <td width="180px">
                            <asp:TextBox ID="txtLotAttr09" runat="server" CssClass="textbox" Enabled="false"
                             ></asp:TextBox>
                        </td>
                        <td width="180px">
                          
                        </td>
                    </tr>
                              <tr>
                        <td width="180px">
                            <asp:Label ID="lblReceiptDate" runat="server" CssClass="label" Text="入库日期" 
                              ></asp:Label>
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblLotAttr05" runat="server" CssClass="label" Text="批次属性05" 
                               ></asp:Label>
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblLotAttr10" runat="server" CssClass="label" Text="批次属性10" 
                                ></asp:Label>
                        </td>
                        <td width="180px">
                          
                        </td>
                    </tr>
                    <tr>
                        <td width="180px">
                            <asp:TextBox ID="txtReceiptDate" runat="server" CssClass="textbox" Enabled="false"
                              ></asp:TextBox>
                        
                        </td>
                        <td width="180px">
                            <asp:TextBox ID="txtLotAttr05" runat="server" CssClass="textbox" Enabled="false"
                             ></asp:TextBox>
                        </td>
                        <td width="180px">
                            <asp:TextBox ID="txtLotAttr10" runat="server" CssClass="textbox"  Enabled="false"
                             ></asp:TextBox>
                        </td>
                        <td width="180px">
                          
                        </td>
                    </tr>
                    <tr>
                        <td width="180px">
                            &nbsp;
                        </td>
                        <td width="180px">
                            &nbsp;</td>
                        <td width="180px">
                            &nbsp;</td>
                        <td width="180px">
                            &nbsp;
                        </td>
                    </tr>
                 </table>
             </div>
                     
        </div>       
        
    </div>
    <input type="hidden" id="hdnOwnerID" runat="server" />
       <input type="hidden" id="hdnFrom" runat="server" />
       <input type="hidden" id="hdnType" runat="server" />    
       <input type="hidden" id="hdnMovementID" runat="server" />
      <input type="hidden" id="hdnLot" runat="server" />    
      <input type="hidden" id="hdnFromLoc" runat="server" />
      <input type="hidden" id="hdnFromLpn" runat="server" />
      <input type="hidden" id="hdnSkuID" runat="server" />

      </ContentTemplate>              
        </asp:UpdatePanel>
        
    </form>
</body>
</html>
